package de.tabuma.lib.contentmanagement.entity;

import de.tabuma.lib.contentmanagement.*;
import java.util.*;
import java.lang.reflect.*;
import javax.servlet.http.*;

/**
 * <p>The content class represents the class and subclasses that have all the informations to create a form based management.<br/>
 * That includes &quot;crud&quot; functionality (create, read, update, drop) and listing of elements.</p>
 * When running the method navigate the class ControllerFacade#controller and ViewFacade#view will be executed.
 * @see GeneralContent
 * @see FormContent 
 * @see ListContent
 * @see #navigate(HttpServletRequest)
 * @see de.tabuma.lib.contentmanagement.ControllerFacade#controller(Content,HttpServletRequest)
 * @see de.tabuma.lib.contentmanagement.ViewFacade#view(Content,HttpServletRequest)
 * @author $Author: $
 * @version $Revision: $
 * @since $Date: $
 */
public class Content {

    /**
     * Variable for setting general content informationen
     */
    public GeneralContent GeneralContent;

    /**
     * Variable for setting form information
     */
    public FormContent FormContent;

    /**
     * Variable for setting list informationen
     */
    public ListContent ListContent;


    /**
     * Class constructor
     */
    public Content() {
        GeneralContent = new GeneralContent();
        ListContent = new ListContent();
        FormContent = new FormContent();
    }

    /**
     * Creates a formular that will create a formular management system with &quot;crud&quot; functionality.
     * @param request from a servlet
     * @return the content of the formular management system that fits to the request parameter.
     */
    public String navigate(HttpServletRequest request) {
        ControllerFacade.controller(this, request);
        return ViewFacade.view(this, request);
    }

}
